package sk.fhi.client.event;

import sk.fhi.shared.model.AbstractEntity;

import com.google.gwt.event.shared.GwtEvent;

public class UpdateEvent extends GwtEvent<UpdateEventHandler> {

	public static Type<UpdateEventHandler> TYPE = new Type<UpdateEventHandler>();
	final AbstractEntity entity;

	public UpdateEvent(AbstractEntity entity) {
		super();
		this.entity = entity;
	}

	@Override
	public Type<UpdateEventHandler> getAssociatedType() {
		return TYPE;

	}

	@Override
	protected void dispatch(UpdateEventHandler paramH) {
		paramH.onUpdateEvent(this);
	}

	public AbstractEntity getEntity() {
		return entity;
	}
}
